package hibernate.model;

import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.OneToOne;
import javax.persistence.PrimaryKeyJoinColumn;
import javax.persistence.Table;
import org.hibernate.annotations.GenericGenerator;
import org.hibernate.annotations.NamedQueries;
import org.hibernate.annotations.NamedQuery;
import org.hibernate.annotations.Parameter;

@SuppressWarnings("serial")
@Entity
@Table(name = "bellekler", catalog = "emmy")
@NamedQueries({   // Şimdilik bu query'lere gerek yok ihtiyaç olursa diye hazırlandı...
@NamedQuery(name = "findBellekUretici", 	query = "from Bellekler where ureticiid = :bUretici"),
@NamedQuery(name = "findBellekUsbVer", 		query = "from Bellekler where usbVersiyon like :bUsbVer"),
@NamedQuery(name = "findBellekTipi", 		query = "from Bellekler where tipi like :bTipi"),
@NamedQuery(name = "findBellekKapasite", 	query = "from Bellekler where kapasite like :bKapasite"),
@NamedQuery(name = "findBellekYhizi", 		query = "from Bellekler where yazmaHizi like :bYhizi"),
@NamedQuery(name = "findBellekOhizi", 		query = "from Bellekler where okumaHizi like :bOhizi"),
@NamedQuery(name = "findBellekRenk", 		query = "from Bellekler where renk like :bRenk"),
@NamedQuery(name = "findBellekBytlar", 		query = "from Bellekler where boyutlari like :bBytlar"),
@NamedQuery(name = "findBellekPlatform", 	query = "from Bellekler where platform like :bPlatform"),
@NamedQuery(name = "findBellekAgirlik", 	query = "from Bellekler where agirlik like :bAgirlik"),
@NamedQuery(name = "findBellekCalisCikar", 	query = "from Bellekler where calisCikarma like :bCalisCikar"),
@NamedQuery(name = "findBellekLed", 		query = "from Bellekler where ledisigi like :bLed"),
@NamedQuery(name = "findBellekReadyboast", 	query = "from Bellekler where readyboast like :bReadyboast"),
@NamedQuery(name = "findBellekGarantiS", 	query = "from Bellekler where garantiSuresi like :bGarantiS")
})
public class Bellekler implements java.io.Serializable {

	private long aygitid;
	private Sirketprofil sirketprofil;
	private Aygit aygit;
	private String usbVersiyon;
	private String tipi;
	private String kapasite;
	private String okumaHizi;
	private String yazmaHizi;
	private String renk;
	private String boyutlari;
	private String platform;
	private String agirlik;
	private String calisCikarma;
	private String ledisigi;
	private String readyboast;
	private String garantiSuresi;

	public Bellekler() {
	}

	public Bellekler(Sirketprofil sirketprofil, Aygit aygit,
			String usbVersiyon, String tipi, String kapasite, String okumaHizi,
			String yazmaHizi, String renk, String boyutlari, String platform,
			String agirlik, String calisCikarma, String ledisigi, String readyboast, String garantiSuresi) {
		this.sirketprofil = sirketprofil;
		this.aygit = aygit;
		this.usbVersiyon = usbVersiyon;
		this.tipi = tipi;
		this.kapasite = kapasite;
		this.okumaHizi = okumaHizi;
		this.yazmaHizi = yazmaHizi;
		this.renk = renk;
		this.boyutlari = boyutlari;
		this.platform = platform;
		this.agirlik = agirlik;
		this.calisCikarma = calisCikarma;
		this.ledisigi = ledisigi;
		this.readyboast = readyboast;
		this.garantiSuresi = garantiSuresi;
	}

	@GenericGenerator(name = "generator", strategy = "foreign", parameters = @Parameter(name = "property", value = "aygit"))
	@Id
	@GeneratedValue(generator = "generator")
	@Column(name = "aygitid", unique = true, nullable = false)
	public long getAygitid() {
		return this.aygitid;
	}

	public void setAygitid(long aygitid) {
		this.aygitid = aygitid;
	}

	@ManyToOne(fetch = FetchType.EAGER)
	@JoinColumn(name = "ureticiid", nullable = false)
	public Sirketprofil getSirketprofil() {
		return this.sirketprofil;
	}

	public void setSirketprofil(Sirketprofil sirketprofil) {
		this.sirketprofil = sirketprofil;
	}

	@OneToOne(fetch = FetchType.EAGER, cascade = CascadeType.ALL)
	@PrimaryKeyJoinColumn
	public Aygit getAygit() {
		return this.aygit;
	}

	public void setAygit(Aygit aygit) {
		this.aygit = aygit;
	}

	@Column(name = "usbVersiyon", nullable = false, length = 20)
	public String getUsbVersiyon() {
		return this.usbVersiyon;
	}

	public void setUsbVersiyon(String usbVersiyon) {
		this.usbVersiyon = usbVersiyon;
	}

	@Column(name = "tipi", nullable = false, length = 20)
	public String getTipi() {
		return this.tipi;
	}

	public void setTipi(String tipi) {
		this.tipi = tipi;
	}

	@Column(name = "kapasite", nullable = false, length = 20)
	public String getKapasite() {
		return this.kapasite;
	}

	public void setKapasite(String kapasite) {
		this.kapasite = kapasite;
	}

	@Column(name = "okumaHizi", nullable = false, length = 20)
	public String getOkumaHizi() {
		return this.okumaHizi;
	}

	public void setOkumaHizi(String okumaHizi) {
		this.okumaHizi = okumaHizi;
	}

	@Column(name = "yazmaHizi", nullable = false, length = 20)
	public String getYazmaHizi() {
		return this.yazmaHizi;
	}

	public void setYazmaHizi(String yazmaHizi) {
		this.yazmaHizi = yazmaHizi;
	}

	@Column(name = "renk", nullable = false, length = 20)
	public String getRenk() {
		return this.renk;
	}

	public void setRenk(String renk) {
		this.renk = renk;
	}

	@Column(name = "boyutlari", nullable = false, length = 50)
	public String getBoyutlari() {
		return this.boyutlari;
	}

	public void setBoyutlari(String boyutlari) {
		this.boyutlari = boyutlari;
	}

	@Column(name = "platform", nullable = false, length = 20)
	public String getPlatform() {
		return this.platform;
	}

	public void setPlatform(String platform) {
		this.platform = platform;
	}

	@Column(name = "agirlik", nullable = false, length = 20)
	public String getAgirlik() {
		return this.agirlik;
	}

	public void setAgirlik(String agirlik) {
		this.agirlik = agirlik;
	}

	@Column(name = "calisCikarma", nullable = false, length = 20)
	public String getCalisCikarma() {
		return this.calisCikarma;
	}

	public void setCalisCikarma(String calisCikarma) {
		this.calisCikarma = calisCikarma;
	}

	@Column(name = "ledisigi", nullable = false, length = 20)
	public String getLedisigi() {
		return this.ledisigi;
	}

	public void setLedisigi(String ledisigi) {
		this.ledisigi = ledisigi;
	}

	@Column(name = "readyboast", nullable = false, length = 20)
	public String getReadyboast() {
		return this.readyboast;
	}

	public void setReadyboast(String readyboast) {
		this.readyboast = readyboast;
	}

	@Column(name = "garantiSuresi", nullable = false, length = 20)
	public String getGarantiSuresi() {
		return this.garantiSuresi;
	}

	public void setGarantiSuresi(String garantiSuresi) {
		this.garantiSuresi = garantiSuresi;
	}
}